﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TemplatePatterns
{
    public class AscendingSorting<T> : TemplateSorting<T> where T : IComparable
    {
        #region Override abstract methods from TemplateSorting class

        protected override void Swap(ref T itemA, ref T itemB)
        {
            if (itemA.CompareTo(itemB) > 0)
            {
                T temp = itemA;
                itemA = itemB;
                itemB = temp;
            }
        }

        #endregion
    }
}
